
def log(a, b, c='info'):
    print(f"Log level: {c}, A: {a}, B: {b}")

log(1, 2)
log(1, 2, 'debug')





print('=' * 40)
def params1(*args, **kwargs):
    print("Positional arguments:", args)
    print("Keyword arguments:", kwargs)
    print("p1:", args[0] if len(args) > 0 else None)
    print("k1:", kwargs.get('name', None))

params1(6, 7, 3, name='Alice', age=30)





print('=' * 40)
def params2(a, b, *args, f=8, **kwargs):
    print("Positional arguments:", args)
    print("Keyword arguments:", kwargs)
    print("a:", a)
    print("b:", b)
    print("f:", f)
    print("p1:", args[0] if len(args) > 0 else None)
    print("k1:", kwargs.get('name', None))

params2(1, 2, 3, 4, f=1000, name='Bob', age=25)





print('=' * 40)
def sum1(a, b):
    print("a:", a)
    print("b:", b)
    return a + b

p1 = sum1(10, 20)
print("(a + b)=", p1)





print('=' * 40)
fun = lambda a, b: a + b
p2 = fun(60, 25)
print("(a + b)=", p2)





print('=' * 40)
p3 = (lambda a, b: a + b)(100, 200)
print("(a + b)=", p3)
p4 = map(lambda x: x + 10, [1, 2, 3, 4])
print("Mapped values:", list(p4))